#include "../include/head.h"
int client_ls(int target,int args_len,char *args,int netfd,char *now_path_buf)
{
    printf("%s\n", args);
    return 0;
}

int client_mkdir(int target,int args_len,char *args,int netfd,char *now_path_buf){
    printf("Directory creation successful\n");
    return 0;
}

int client_cd(int target,int args_len,char *args,int netfd,char *now_path_buf) {
    // printf("args = %s \n", args);
    // bug: 如果用长度短的路径去覆盖长度长的路径，会有残余，因此如果不提前清空now_path_buf
    // 会读到残余的垃圾数据，所以必须bzero now_path_buf
    bzero(now_path_buf, strlen(now_path_buf));
    memcpy(now_path_buf, args, args_len);
    
    printf("cd成功，当前目录转到%s \n", now_path_buf);

    return 0;
}

int client_rmfile(int target,int args_len,char *args,int netfd,char *now_path_buf) {
    printf("%s \n", args);

    return 0;
}
int client_rmdir(int target,int args_len,char *args,int netfd,char *now_path_buf){
    printf("Directory delete successful\n");
    return 0;
}
